﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.IDAL;
using AspNetCs.DALFactory;
using System.Data;
using AspNetCs.Model;

namespace AspNetCs.Bll
{

    public class Memorial_Type
    {
        private IMemorial_Type MemorialType = Conn.CreateMemorial_Type();


        public DataTable GetDataTable(string filter)
        {
            return MemorialType.GetDataTable(filter);
        }
        public int Update(Memorial_Type_Model md)
        {
            return MemorialType.Update(md);
        }

        public Memorial_Type_Model GetModel(DataRow dr)
        {
            return MemorialType.GetModel(dr);
        }

        public Memorial_Type_Model GetModel(int id)
        {
            Memorial_Type_Model md = new Memorial_Type_Model();
            DataTable dt = MemorialType.GetDataTable(" and id=" + id + "");
            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    md = MemorialType.GetModel(dt.Rows[0]);
                }
            }
            return md;
        }







    }

    public sealed class Memorial_TypeBll
    {

        /// <summary>
        /// 实例化此类
        /// </summary>
        public static Memorial_Type CreateNew
        {
            get
            {
                return new Memorial_Type();
            }
        }
    }


}
